package wh.threadlocal;

/**
 * @author: wh(1835734390 @ qq.com)
 * @date: 2022/4/27 9:54
 * @description:创建ThreadSafeFormatter类，该类的主要作用就是作为SimpleDateFormat对象的来源；
 * @version:
 */

import java.text.SimpleDateFormat;

public class ThreadSafeFormatter {
    public static ThreadLocal<SimpleDateFormat> dateFormatThreadLocal =
            ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"));

}
